package com.bocloud.cmp.entity.resource;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;

/**
 * 端口组实体类
 * 
 * @author weiwei
 * @since 2017.4.20
 *
 */
@Table("port_group")
public class PortGroup extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("vendor_id")
	private Long vendorId; // 云供应商ID
	@Column("network_id")
	private Long networkId; // 网络ID
	@Column("type")
	private String type; // 端口组类型
	@Column("port_num")
	private Integer portNum;
	@Column("group_val")
	private String groupVal;

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the vendorId
	 */
	public Long getVendorId() {
		return vendorId;
	}

	/**
	 * @param vendorId
	 *            the vendorId to set
	 */
	public void setVendorId(Long vendorId) {
		this.vendorId = vendorId;
	}

	/**
	 * @return the networkId
	 */
	public Long getNetworkId() {
		return networkId;
	}

	/**
	 * @param networkId
	 *            the networkId to set
	 */
	public void setNetworkId(Long networkId) {
		this.networkId = networkId;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the portNum
	 */
	public Integer getPortNum() {
		return portNum;
	}

	/**
	 * @param portNum
	 *            the portNum to set
	 */
	public void setPortNum(Integer portNum) {
		this.portNum = portNum;
	}

	/**
	 * @return the groupVal
	 */
	public String getGroupVal() {
		return groupVal;
	}

	/**
	 * @param groupVal
	 *            the groupVal to set
	 */
	public void setGroupVal(String groupVal) {
		this.groupVal = groupVal;
	}

	public void preSave(Long createrId, Long menderId, Long vendorId, Long networkId) {
		this.setCreaterId(createrId);
		this.setMenderId(menderId);
		this.setVendorId(vendorId);
		this.setNetworkId(networkId);
	}

}
